package cn.shop.msgs;

import cn.shop.utils.enums.OrderStatus;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.time.LocalDateTime;

/**
 * @author : 李一涵
 * @date : Created in 2021-12-17 14:21
 * @description :
 */
@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class OrderMsg extends BaseMsg {

    public final static String TOPIC = "shop-topic-order";

    public final static String TAG = "order";
    public final static String DESTINATION = TOPIC + ":" + TAG;

    private OrderStatus status;

    public static OrderMsg start(){
        return new OrderMsg();
    }

    public OrderMsg status(OrderStatus status) {
        this.status = status;
        return this;
    }

    @Override
    public OrderMsg id(long... id) {
        super.id(id);
        return this;
    }

    @Override
    public OrderMsg time(LocalDateTime time) {
        super.time(time);
        return this;
    }
}
